﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using Model.Entity;
using Ones.Infrastructure.Utils.Pagination.Impl;

namespace Ones.Wcf.SystemAdministration
{
    [ServiceContract]
    public interface IServiceHumanResourceManagement
    {
        #region Div
        
        #region DMM
        
        [OperationContract]
        Boolean addDivision(Division division);
        
        [OperationContract]
        Boolean updateDivision(Division division);
        
        [OperationContract]
        Boolean deleteDivision(String id);
        
        #endregion
        
        #region DQM
        
        [OperationContract]
        List<Division> searchAllDivisions();
        
        [OperationContract]
        Division searchDivisionById(String id);
        
        [OperationContract]
        List<Division> searchDivisionByName(String name);

        //cua V
        [OperationContract]
        List<JobAssignment> searchDivisionByEmpId(String empID);

        #endregion
        
        #endregion Div
        
        #region Job
        
        #region DMM
        
        [OperationContract]
        Boolean addJob(Job job);
        
        [OperationContract]
        Boolean updateJob(Job job);
        
        [OperationContract]
        Boolean deleteJob(String id);
        
        #endregion
        
        #region DQM
        
        [OperationContract]
        List<Job> searchAllJobs();
        
        [OperationContract]
        Job searchJobById(String id);
        
        [OperationContract]
        List<Job> searchJobByTitle(String title);
        
        #endregion
        
        #endregion Job
        
        #region Emp
        
        #region DMM
        
        [OperationContract]
        Boolean enrollEmployee(Employee employee, String divId, String jobId, DateTime dateStart, DateTime dateFinish);
        
        [OperationContract]
        Boolean updateEmployeeInfo(Employee employee);
        
        [OperationContract]
        Boolean updateEmployeeDivision(String empId, String divId);
        
        [OperationContract]
        Boolean updateEmployeeJob(String empId, String jobId);
        
        #endregion
        
        #region DQM
        
        [OperationContract]
        List<Employee> searchAllEmployees();
        
        [OperationContract]
        Employee searchEmployeeById(String empId);
        
        [OperationContract]
        Employee searchEmployeeByUser(Guid userId);
        
        [OperationContract]
        List<Employee> searchEmployeeByName(String name);
        
        [OperationContract]
        List<Employee> searchEmployeeByGender(Boolean isMale);
        
        #endregion
        
        #endregion Emp
        
        #region View Emp Detail
        
        [OperationContract]
        List<ViewEmployeeDetail> searchAllEmployeeDetails();
        
        #endregion
        
        #region ///Paging///
        
        [OperationContract]
        LazyPagination<Division> pagingAllDivisions(int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<Job> pagingAllJobs(int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<Employee> pagingAllEmployees(int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<ViewEmployeeDetail> pagingAllEmployeeDetails(int pageNumber, int pageSize);

        #endregion
    }
}